<!doctype html>

<html>
  <head>
	<meta charset="utf-8">
	<title>Emscripten:XMLHttpRequest_js</title>
  </head>
  <body>
	<script>
	var request = new XMLHttpRequest();
	request.open("GET", "t1.txt", true);
	request.responseType = "text";	
	request.onreadystatechange = function(){
		if (request.readyState == 4) {
			if (request.status == 200) {
				console.log(request.responseText);
			}
			else{
				console.log(request.statusText);
			}
		}
	};
	request.send();
	</script>
  </body>
</html>